The present invention relates generally to the storage and restoration of display data and more particularly to the maintenance of display state data associated with data elements within a data structure having a defined hierarchy of data elements.
Users of application programs have become accustomed to having a variety of tools with which to display information that has been processed by the application program. Presentation of data has become almost as important a feature of an application program as the application program""s ability to process the data. For example, spreadsheet application programs are typically provided with presentation or display tools enabling a user to highlight important data elements in the spreadsheet and to de-emphasize or even hide other data elements that are less appropriate for presentation purposes. Similarly, database application programs are often provided with display tools that permit the user to display particular data elements of the database in various formats, while hiding or de-emphasizing other data elements.
The display of an application program can be said to be composed of any number of display objects that are associated with the data elements of the application program. For example, in a database program that maintains a list of records, each record having a number of fields, a user may choose to display only particular fields of a single record at a time. The displayed portion of the record is a display object and each displayed field within that record is a display object. On the other hand, each field within each record is a data element. Thus, the display object and the data element are associated with each other, but are not necessarily co-extensive. The characteristics of the display objects do not alter or affect the characteristics of the underlying data elements.
Display objects are typically maintained within a hierarchical data structure with affordances associated with each data element. In the context of this discussion, an affordance is a display characteristic associated with a display object that affords change of the characteristic. As a simple example, if a display object has been formatted with a green background, then the display object""s ability to have the background color associated with it changed is referred to as an affordance. The object affords the change of the background color. As another example, if a display object can be hidden (i.e., not displayed to the user), yet still be associated with a data element, then the display object""s ability to be hidden is also referred to as an affordance. Notably, affordances are associated with display objects, not data elements. A data element is the underlying data in an application program, whereas a display object is independent of the underlying data. Data elements can be moved within the data element hierarchy, without changing the display objects. Conversely, display objects can be changed without substantively affecting the associated data elements.
The display objects are maintained in a hierarchical data structure, to the extent that the display objects are subject to the display characteristics of a superior display object. Returning to the example of the database record, the display object associated with a particular field in the displayed record is inferior to the display characteristics of the display object associated with the displayed record. If, for example, a user applies a green background to the display object associated with the displayed record, then the display object associated with a field within the record will be assigned a green background, because the record display object is superior to the field display object. If the user subsequently applies a blue background to the field display object, then the record display object is not affected, because the record display object is superior to the field display object.
When a user applies various display characteristics to the display objects of a particular application program or associated data file, the user expects that those display characteristics will be maintained such that the display will look the same way when the user returns to it as when the user left it. For example, a database user may apply display characteristics to a particular record and then exit the application program. When that user restarts the application program, the user will expect that particular record to be displayed as the user left it. That is, the display state of the record should be restored when the user accesses the record.
The storage and restoration of a display state can be accomplished in various ways. The simplest way is to store the display state of each display object associated with a particular application program and/or data file. Unfortunately, as more and more affordances are required by application programs, this method becomes very consumptive of processor time and computer memory. Thus, there is a need for an efficient method for maintaining and tracking changes made to display state data. The method should be simple, so that it can be performed quickly and efficiently. However, the method should be powerful and adaptable, such that multiple affordances can be processed efficiently and new affordances can be accommodated.
The present invention addresses these needs by maintaining and tracking changes to display state data for display objects contained within a hierarchical data structure where the display state of the objects being tracked has more than one superior display object. Because many display objects within a hierarchical data structure are inferior to more than one other display object, changes made to the superior display objects often determine at least one aspect of the display state of the inferior display objects. The present invention provides an efficient means for storing and restoring display state data, such that the hierarchy may be maintained with a minimal impact on processor and memory resources. Changes to display state data are tracked by means of a sequence number generator that assigns a sequence number to display state changes as they are made by the user. The present invention utilizes a process for storing the display state data and a process for loading (restoring) the stored display state data.
In one aspect of the present invention, a system for storing and restoring display state data for a hierarchical data structure is provided. The system has three main components: a sequence number generator, a display state data storage module, and a display state data restoration module. The sequence number generator is operative to assign a sequence number to each display state change corresponding to each of a number of display objects, as each display state change is made. The storage module is operative to store a sequence number, the display state change made, and a unique identifier corresponding to the display object for which the display state change was made. This display state change data is stored in a display state data module. The restoration module is operative to retrieve the sequence numbers, the corresponding display state changes, and the corresponding unique identifier from the display state data module for each of the display state changes made.
In another aspect of the present invention, the display state change is a color change of the display object. In still another aspect of the invention, the display state change is a change in a show/hide value of the display object.
In another aspect of the invention, the sequence number generator is further operative to assign sequence numbers to display state changes corresponding to the changed display objects, such that the plurality of sequence numbers provide a temporal relationship between each of the plurality of display state changes. In still another aspect of the invention, the last-made display state change is associated with the highest sequence number and the first-made display state change is associated with the lowest sequence number.
In another aspect of the present invention, the storage module is further operative to compare the sequence numbers assigned to particular stored display state changes. If a first sequence number is greater than a second sequence number, then the storage module will store the second sequence number along with its display state change, and its unique identifier to the display state data module. In still another aspect of the present invention, the storage module will not store the display state data corresponding to the second sequence number, if it is determined that the first sequence number is greater than the second sequence number.
In another aspect of the invention, the restoration module is further operative to compare a first unique identifier corresponding to a display object that requires display state data to a second unique identifier. If the first unique identifier and the second unique identifier are identical, then the restoration module will retrieve the second sequence number and the second display state change corresponding to the second unique identifier from the display state data module. If the first unique identifier and the second unique identifier are not identical, then the restoration module will not retrieve the second sequence number or the second display state change corresponding to the second unique identifier from the display state data module.
In another aspect of the invention, the display objects can be a cell, a row, a column, or a grid.
In another aspect of the present invention, the hierarchical data structure is a database. In yet another aspect of the invention, the hierarchical data structure is a spreadsheet.